﻿
using System;
using System.Diagnostics;
namespace Kindler.IO.MobiFile
{
    [DebuggerDisplay("{Type}: {Value}")]
    public class ExthRecord
    {
        [MobiProperty(0, LengthInBytes = 4)]
        public ExthRecordType Type { get; set; }

        [MobiProperty(1, LengthInBytes = 4)]
        public UInt32 Length { get; set; }

        [MobiProperty(2, LengthProperty = "ValueLength")]
        public string Value { get; set; }

        public int ValueLength
        {
            get { return (int)this.Length - 8; }
        }
    }
}